package com.itheima.mapper;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    @Select("select * from user ")
    List<User> findAll();

    @Update("update user set username=#{username},password=#{password} ,age=#{age},email=#{email},sex=#{sex} where id=#{id} ")
    int update(User user);

    @Select("select * from user where id=#{id} ")
    User findById(int id);

}
